<?php

namespace api\modules\v1\models;

use common\models\Functions;

/**
 * This is the model class for table "goods".
 *
 * @property int $id
 * @property string $name
 */
class Article extends Common
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%article_info}}';
    }

    public function about(){
        $info = static::getOneInfoById(1, ["title", "content", "create_time", "update_time"]);
        //获取审核版
        return Functions::formatRestAPI(0, '', $info);
    }

    public function registerPro(){
        $info = static::getOneInfoById(2, ["title", "content", "create_time", "update_time"]);
        //获取审核版
        return Functions::formatRestAPI(0, '', $info);
    }

    public function getInfo($id = 0){
        $info = static::getOneInfoById($id, ["title", "content", "create_time", "update_time"]);
        //获取审核版
        return Functions::formatRestAPI(0, '', $info);
    }
}